const home = r => require.ensure([], () => r(require('../page/home/home')), 'home');
const shop = r => require.ensure([], () => r(require('../page/shop/shop')), 'shop');
const foodDetail = r => require.ensure([], () => r(require('../page/shop/children/foodDetail')), 'foodDetail');
const shopDetail = r => require.ensure([], () => r(require('../page/shop/children/shopDetail')), 'shopDetail');
const shopSafe = r => require.ensure([], () => r(require('../page/shop/children/children/shopSafe')), 'shopSafe');

export default [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    component: home
  },
  {
    path: '/shop',
    component: shop,
    children: [
      {
        path: 'foodDetail',
        component: foodDetail
      },
      {
        path: 'shopDetail',
        component: shopDetail,
        children: [
          {
            path: 'shopSafe',
            component: shopSafe
          }
        ]
      }
    ]
  }
];
